package com.chongchong.core.mp.config;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**mybatis自定义id生成
 * @ClassName CustomerIdGenerator
 * @Author wuning
 * @Date 2022/9/27 10:41
 * @Version 1.0
 */
@Primary
@Component
public class CustomerIdGenerator implements IdentifierGenerator {
	@Override
	public Long nextId(Object entity) {
		// 填充自己的Id生成器，
		return IdGenerator.generateId();
	}
}

